Feature/restructure market creation incentives#62
Open
udkreddySomish wants to merge 60 commits intomasterfrom
Open
Feature/restructure market creation incentives#62udkreddySomish wants to merge 60 commits intomasterfrom
udkreddySomish wants to merge 60 commits intomasterfrom
Conversation
maxsam4
reviewed
Oct 21, 2020
maxsam4
approved these changes
Oct 21, 2020
…e for market creator
maxsam4
reviewed
Nov 7, 2020
| IMarket(penultimateMarket).settleMarket(); | ||
| } | ||
| if(marketCreationData[_marketType][_marketCurrencyIndex].marketAddress != address(0)) { | ||
| (,,,,,,,, uint _status) = getMarketDetails(marketCreationData[_marketType][_marketCurrencyIndex].marketAddress); |
Collaborator
There was a problem hiding this comment.
Making marketStatus() public and then directly using that instead of this generic function will save a decent chunk of gas. However, that'll only work for new markets.
maxsam4
approved these changes
Nov 9, 2020
…ure/pauseMarketCreationOfType
Added a functionality to pause market creation of particular type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MarketRegistry contract to be upgraded with new implmentation.
Market creation incentives to be now distributed as per the estimate of gas cost of the market creation transaction.
Incentives will be transaction cost worth of PLOT(as per the price prevailing at the time of market creation)
Fast gas price to be fetched from Chainlink Fast gas/ GWei aggregator
Formulae for incentive calculation:
min(gas price given, chainlinkfeed*1.25, max Gas price)* gasUsed for txworth of PLOT1.25 is to be considered as maximum deviation of fast gas price from Chainlink aggregator.
gas price given is the gas price set by user while signing the transaction
max Gas price is pre set configurable variable of value 100GWei
A part of reward pool of market will also be distributed to market creator only if leveraged participation of market reches threshold of 1Eth(Configurable)
Formulae for Percent of market reward pool to be distributed to market creator
Minimum( maxRewardPoolPercForMC, (minRewardPoolPercForMC + tokensLocked/plotStakeForRewardPoolShare))maxRewardPoolPercForMC: Maximum reward pool share percent(configurable)- Default: 5%
minRewardPoolPercForMC: Minimum reward pool share percent(configurable)Default: 0.5%
tokensLocked: Tokens staked by market creator for reason SM
plotStakeForRewardPoolShare: Minimum plot stake required to increase reward pool share% (configurable)Default: 25000PLOT